var client = Ti.Network.createHTTPClient({
    onload: function(e) {
        //request complete do something with data
        //assuming that we are not working with XML
        alert('Response received '+this.responseText);
Ti.API.info(this.responseText);
    },
    onerror: function(e) {
        //error received, do something
    }
});

function notifyUser(title,message) {
	var notification = Ti.Notification.createNotification();
	notification.setTitle(title);
	//notification.name("Crypto Chat");
	notification.setMessage(message);
	notification.show();
}

function waitForMsg() {
	var d = new Date();
	var n = d.getTime();
	var url = 'https://www.sipmeeting.com/cryptochat/msgsrv.php?timestamp=_'+n;
	//var url = 'https://www.nocostconference.com/'
	//Create the HTTP Client

	client.open('GET',url,true);
	//Send request
	client.send();	
}

